<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="favicon.ico" >
<link rel="Shortcut Icon" href="favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link href="/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="/HadminPage/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/HadminPage/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/HadminPage/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/HadminPage/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/HadminPage/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->
<style>
	.table thead>tr>th, .table tbody>tr>th, .table tfoot>tr>th, .table thead>tr>td, .table tbody>tr>td, .table tfoot>tr>td {
	    padding: 8px;
	    line-height: 1.428571429;
	    vertical-align: middle !important;
	    border-top: 1px solid #ddd;
    }
    
#menu-product dd{
	background: #fff;
}
#menu-product dd li i{
	display: inline-block;
	margin-right: 5px;
}
</style>
<title>星空健康服务中心-后台管理系统</title>
<meta name="token" token="{{ csrf_token() }}">
<meta name="keywords" content="H-ui.admin v3.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<section>

	<div class="Hui-article">
		<article class="cl pd-20">
			<table class="table table-border table-bordered table-bg" >
				<thead>
					<tr>
						<th scope="col" colspan="5">医生列表</th>
					</tr>
					<tr class="text-c">
						<th width="40">ID</th>
						<th width="150">医生名称</th>
						<th width="150">商品价格</th>
						<th width="150">佣金金额</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<tbody>
					
					@if($data['code'] == 1)		
					@foreach ($data['data'] as $item)
						<tr class="text-c">
							<td>{{$item->id}}</td>
							<td>{{$item->name}}</td>
							<td>{{$item->price}}</td>
							<td class="cash-val"><input value="{{$item->cash}}"/></td>
							<td class="td-manage">
								<a title="设置" href="javascript:void(0)"  class="doctor ml-5" data-id="{{$item->id}}" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a> 
							</td>
						</tr>
					@endforeach	
									
					@else
						<tr>
							<td colspan="5" style="text-align: center;">{{$data['msg']}}</td>
						</tr>
					@endif					
					
					
				</tbody>
			</table>
			
				
		</article>
	</div>
	<input type="hidden" id="goods_id"  value="{{$goods_id}}"/>
</section>

<!--_footer 作为公共模版分离出去--> 
<script type="text/javascript" src="/HadminPage/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/layer/2.4/layer.js"></script> 
<script>
	 $('.doctor').click(function(){
	 	var doctor_id = $(this).attr('data-id');
	 	var goods_id  = $('#goods_id').val();
	 	var cash      = $(this).parents('.text-c').find('.cash-val input').val();

	 	$.ajax({
			type: 'POST',
			url: '/product/goods/setCash',
			data:{doctor_id:doctor_id,goods_id:goods_id,cash:cash},
			headers: {
            	'X-CSRF-TOKEN': $('meta[name="token"]').attr('token'),
        	},
			dataType: 'json',
			success: function(res){
				if(res.code == 1) {
		           layer.msg('设置成功');
			               
				}else{
				            // 失败
				    layer.msg(res.msg);
			    }
							
				},
				error:function(res) {
		
					layer.msg(res.msg);
				},
			});	
	 })
</script>

</body>
</html>
	
	
	







